<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>购物车页面</title>
</head>
<body>
    <h1 align="center">购物车页面</h1>
    <table>
        <thead>
            <tr>
                <th>商品序号&nbsp;&nbsp;&nbsp;</th>
                <th>商品名称&nbsp;&nbsp;&nbsp;</th>
                <th>商品图片&nbsp;&nbsp;&nbsp;</th>
                <th>商品价格&nbsp;&nbsp;&nbsp;</th>
                <th >购买数量&nbsp;&nbsp;&nbsp;</th>
                <th>商品总价&nbsp;&nbsp;&nbsp;</th>
            <tr/>
        </thead>
        <tbody>
            {% for good in goods %}
            <tr>
<!--                forloop.counter (默认从1开始，若需要从多少开始在countter后面写几)  for循环的参数-->
                <th>{{forloop.counter}}&nbsp;&nbsp;&nbsp;</th>
                <th>
                    <a href="/detail/?gid={{good.gid}}">{{good.name}}</a>&nbsp;&nbsp;&nbsp;
                </th>
                <th><img src={{good.imgsrc}} width="50" height="50">&nbsp;&nbsp;&nbsp;</th>
                <th>{{good.price}}&nbsp;&nbsp;&nbsp;</th>
                <th>{{good.buy_count}}&nbsp;&nbsp;&nbsp;</th>
                <th>{{good.allprice}}</th>
                <th>删除购物车商品</th>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</body>
</html>